package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"mall/api/internal/config"
	"mall/mallrpc/mallrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	Mallrpc mallrpcclient.Mallrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		Mallrpc: mallrpcclient.NewMallrpc(zrpc.MustNewClient(c.Mallrpc)),
	}
}
